import Ajax from "./request"
import { getToken } from "@/utils/auth";

// export const weChatMonthCheckDraf = (data: any) => {
//     return Ajax({
//         url: `/check/monthlyCheckSave`,
//         method: 'post',
//         data: data
//     })
// }

// 上传文件
export const oosUploadImage = (formData: any) => {
    return Ajax({
        url: '/common/upload',
        headers: {
            'Content-Type': 'multipart/form-data',
            token: getToken(),
        },
        data: formData.realFormData || formData,
        method: 'post',
        transformRequest: (data: any) => { data.toString = () => "[object FormData]"; return data; }
    })
}


// 登录
export const login = (data: any) => {
    return Ajax({
        url: '/login',
        method: 'get',
        params: data
    })
}
